package com.example.springboot_system.Controller;
import com.example.springboot_system.pojo.Role;
import com.example.springboot_system.service.RoleService;
import com.example.springboot_system.service.UserService;
import com.example.springboot_system.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;
import java.util.List;

@Controller
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private RoleService roleService ;

    @Autowired
    private UserService userService;

    @RequestMapping("/findAllRole")
    @ResponseBody
    public ResponseResult findAllRole(HttpSession session){
        ResponseResult result = roleService.findAllRole(session);
        return result;
    }
}
